<html>
<head><title>MoTDStats README/INFO</title></head>
<body>
<p>
<h3>What Is It?</h3>

MoTDStats is a Perl script, intended to be installed system-wide, and the output incorporated into a Message of the Day. It can also be used standalone as either the MoTD script for a certain user, or for all users (you'll have to configure that yourself, though). <br/>

Curently, it prints the following: Username of the current user, the current date and time, kernel/OS type and architecture, amount of free disk space on installed hard disks.
</p>

<p>
<h3>Configuration</h3>

The script should Just Work&reg;, with minimum changes required. At the very minimum, the path to the Perl interpreter may need changing for your platform.<br/>
MoTDStats also has a number of other options you can/must set (depending on your platform): <br/>
<b>my</b> <font color="maroon">$ColourPrinting</font> <br/>
<b>my</b> <font color="maroon">$DFPlatform</font> <br/>
<b>my</b> <font color="maroon">$DFNode</font> <br/> <br/>

<font color="maroon">$ColourPrinting</font> can be set to either <b>1</b> to enable printing a blue banner behind the date and time info (the default), or <b>0</b>, to disable the banner. If you enable this, you will need to install the Term::ANSIColor CPAN module, if it isn't already installed. If this is disabled, you won't need to install it. <br/> <br/>

<font color="maroon">$DFPlatform</font> can be set to <font color="red">"Autodetect"</font> (the default), which works on most platforms using the GNU utilities, or a compatible df utility, with only a minimal change to the $DFNode option.<br/>
On some platforms, this may need changing (e.g. on QNX or Minix), only the Autodetect setting is currently implemented, though, until I can get round to adding options for other platforms that need them. If you use QNX, set this to <font color="red">"QNX"</font>, and <font color="maroon">$DFPlatform</font> to <font color="red">"hd"</font> to make this script work. <br/> <br/>

<font color="maroon">$DFNode</font> can be set to <font color="red">"sd"</font> (the default), for those with either SCSI disks on Linux, or those affected by the rather stupid decision by the Linux kernel developers to present both SCSI and ATA disks as sd nodes (the reason behind this option). It can also be <font color="red">"hd"</font>, if you don't have one of the affected kernels or SCSI disks, or if you use QNX. On Apple Darwin, use <font color="red">"disk"</font>. FreeBSD users can use either <font color="red">"ad"</font> or <font color="red">"da"</font> as required. <br/> <br/>

Nothing else should be changed in the script, unless you have a good reason for it.
</p>

<p>
<h3>History</h3>

The first version was quickly hacked up in a few hours as a proof of concept/quick and dirty toy, and consisted of a number of kludges, bad design decisions/code, and was a sprawling mass of code for each platform type and disk node type. <br/> The early version was cleaned up and slightly corrected by Sjors Gielen (thanks!), and later had much of the platform specific code (spanning 4 'if' statements) replaced by the current "autodetection" code by myself. <br/> You can find the source code for the initial version in a PasteBin somewhere (won't say where, though), you probably wouldn't want the preliminary code, though ;).
 <br/> <br/>
Version 0.0.0a is the Initial Public Release. Brought to you by voodoo, nested if statements, endless hours of annoying, accidental NX session kills, and the want to do something whilst bored...
 <br/> <br/>
Version 0.0.0b has few changes from the Initial Public Release, except some hacks to make it print the amount of free disk space on the QNX Neutrino RTOS (might also work on QNX4, but it hasn't been tested). On a "trial balloon" basis, the username is now obtained from $LOGNAME, instead of $USER, since it seems to be more portable (tested on Linux, FreeBSD and QNX, may (not) work work on other platforms).
<br/> It also comes with this prettier, more colourful version of the INFO file generated from the original text file by hand; in KWrite (no fancy WYSIWYG tools, here).
</p>

<p>
<h3>Licensing</h3>

This script is made available under the MIT License, a copy of which is contained in this section. <br/> <br/>

Copyright (c) 2007 Tyson Key, Sjors Gielen, Anyone else who wishes to contribute <br/>

Permission is hereby granted, free of charge, to any person <br/>
obtaining a copy of this software and associated documentation <br/>
files (the "Software"), to deal in the Software without <br/>
restriction, including without limitation the rights to use, <br/>
copy, modify, merge, publish, distribute, sublicense, and/or sell <br/>
copies of the Software, and to permit persons to whom the <br/>
Software is furnished to do so, subject to the following <br/>
conditions: <br/>

The above copyright notice and this permission notice shall be <br/>
included in all copies or substantial portions of the Software. <br/>

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, <br/>
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES <br/>
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND <br/>
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT <br/>
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, <br/>
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING <br/>
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR <br/>
OTHER DEALINGS IN THE SOFTWARE. <br/>
</p>
</body>
</html>